<template>
  <div>
    <div class="banner">
      <div class="banner-item">
        <div class="title">人员统计</div>
        <div class="info">
          <div class="info-num">
            <span class="num">24567</span><span class="tag">名</span>
          </div>
          <div class="info-icon">
            <span class="el-icon-user"></span>
          </div>
        </div>
      </div>
      <div class="banner-item">
        <div class="title">部门统计</div>
        <div class="info">
          <div class="info-num">
            <span class="num">12</span><span class="tag">部</span>
          </div>
          <div class="info-icon">
            <span class="el-icon-s-home"></span>
          </div>
        </div>
      </div>
      <div class="banner-item">
        <div class="title">档案统计</div>
        <div class="info">
          <div class="info-num">
            <span class="num">342</span><span class="tag">部</span>
          </div>
          <div class="info-icon">
            <span class="el-icon-s-order"></span>
          </div>
        </div>
      </div>
      <div class="banner-item">
        <div class="title">设备统计</div>
        <div class="info">
          <div class="info-num">
            <span class="num">2123456</span><span class="tag">台</span>
          </div>
          <div class="info-icon">
            <span class="el-icon-s-platform"></span>
          </div>
        </div>
      </div>
    </div>
    <el-carousel height="430px" :autoplay="false">
      <el-carousel-item v-for="item in imgList" :key="item.id">
        <el-image :src="item.url" fit="cover"></el-image>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  data() {
    return {
      imgList: [
        {
          id: 1,
          url: 'https://s1.ax1x.com/2020/11/07/B48QWn.jpg'
        },
        {
          id: 2,
          url: 'https://s1.ax1x.com/2020/11/07/B48MJs.jpg'
        },
        {
          id: 3,
          url: 'https://s1.ax1x.com/2020/11/07/B48Kij.jpg'
        },
        {
          id: 4,
          url: 'https://s1.ax1x.com/2020/11/07/B48noQ.jpg'
        }
      ]
    }
  }
}
</script>

<style lang="less" scoped>
.banner {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;

  .banner-item {
    box-sizing: border-box;
    // flex: 1;
    width: 24%;
    height: 120px;
    color: #fffefe;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;

    cursor: pointer;

    .title {
      font-size: 16px;
    }
    .info {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .info-num {
        .num {
          font-size: 26px;
          font-weight: 600;
        }
        .tag {
          font-size: 14px;
          margin-left: 5px;
        }
      }
      .info-icon {
        // color: #bebebe;
        font-size: 36px;
      }
    }
  }
  .banner-item:nth-child(1) {
    background-color: #ffaf00;
  }
  .banner-item:nth-child(2) {
    background-color: #ff8041;
  }
  .banner-item:nth-child(3) {
    background-color: #34c874;
  }
  .banner-item:nth-child(4) {
    background-color: #1a95ff;
  }
}
.el-carousel {
  .el-image {
    width: 100%;
    height: 100%;
  }
}
</style>
